/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dotexe.webframework.core.clientactions;
import org.json.JSONException;
import org.json.JSONObject;

import com.dotexe.webframework.core.bindings.BindingSource;
/**
 *
 * @author jovan.tomasevic
 */
public class BindDataSourceConfiguration extends ClientActionConfiguration {

    public BindDataSourceConfiguration() throws JSONException{
        super();
        this.put("BindingSource", JSONObject.NULL);
        this.setType("BindDataSource");
    }

    public BindDataSourceConfiguration(BindingSource bs) throws JSONException{
        this();
        this.put("BindingSource", bs);
    }

    public void setBindingSource (BindingSource source) throws JSONException{
        if(source == null){
            this.put("BindingSource", JSONObject.NULL);
        }
        else{
            this.put("BindingSource", source);
        }
    }
    public BindingSource getBindingSource() throws JSONException{
        return (BindingSource) this.get("BindingSource");
    }
}
